import { request } from '@/utils'

interface ThresholdConfigData {
  id?: string
  [key: string]: any
}

interface ThresholdConfigParams {
  [key: string]: any
}

export function robotInspectionLog(id: string) {
  return request({
    url: '/robot-inspection-log/v1/' + id,
    method: 'get'
  })
}

export const thresholdConfig = {
  create(data: ThresholdConfigData) {
    return request({
      url: '/system-configuration/v1',
      method: 'post',
      data
    })
  },
  read(params: ThresholdConfigParams) {
    return request({
      url: '/system-configuration/v1',
      method: 'get',
      params
    })
  },
  update(data: ThresholdConfigData) {
    return request({
      url: '/system-configuration/v1',
      method: 'put',
      data
    })
  },
  delete(id: string) {
    return request({
      url: '/system-configuration/v1/' + id,
      method: 'delete'
    })
  }
}
